<template>
  <view class="flex-col page">
    <view class="flex-col group_1">
      <view class="flex-col items-start text-wrapper">
	  <textarea class="text_1" v-model="value" placeholder="请输入您的建议"></textarea>
	  </view>
      <view class="flex-col items-center button" @click="submit"><text class="text_2">提交</text></view>
    </view>
  </view>
</template>

<script>
import {feedback} from '../../api/api.js'
  export default {
    components: {},
    data() {
      return {
        value: ''
      };
    },
    methods: {
      submit() {
        let data = {
          msg: this.value,
		  type:0
        }
        feedback(data).then(() => {
          uni.showToast({
            title: '提交成功！',
            icon: 'none'
          })
          setTimeout(() => {
            this.value = ''
            uni.navigateBack()
          }, 1000)
        })
      }
    },
  };
</script>

<style scoped lang="css">
  .page {
    background-color: #f5f5f5;
    border-bottom: solid 0.28rem #ffffff;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
  }
  .group_1 {
    padding: 0.94rem 0.91rem 2.72rem 0.94rem;
    flex: 1 1 auto;
    overflow-y: auto;
  }
  .text-wrapper {
    padding: 0.91rem 0 7.78rem;
    background-color: #ffffff;
    border-radius: 0.47rem;
  }
  .button {
    margin-top: 22rem;
    padding: 0.91rem 0 0.88rem;
    background-color: #1989E1;
    border-radius: 1.31rem;
  }
  .text_1 {
    margin-left: 0.94rem;
    color: #bfbfbf;
    font-size: 0.75rem;
    font-family: SourceHanSansCN;
    line-height: 0.72rem;
  }
  .text_2 {
    color: #ffffff;
    font-size: 0.88rem;
    font-family: SourceHanSansCN;
    font-weight: 500;
    line-height: 0.84rem;
  }
</style>